<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/css/index_work.css">
    <script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript"></script>
</head>
<body>
<table>
    <tr>
        <th colspan="10">
            <form action="list.do" method="post">
                发布时间：<input type="text" name="start" value="${start}">-
                <input type="text" name="end" value="${end}">
                <input type="submit" value="查询">
                <a href="add.jsp"><input type="button" value="添加"> </a>
                <a href="pai.do"><input type="button" value="评分排行榜"> </a>
            </form>
        </th>
    </tr>
    <tr>
        <th>编号</th>
        <th>歌曲名</th>
        <th>来源</th>
        <th>发布时间</th>
        <th>歌曲评分</th>
        <th>歌手</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${plist.list}" var="song">
        <tr>
            <td>${song.sid}</td>
            <td>${song.sname}</td>
            <td>${song.scome}</td>
            <td>${song.sdate}</td>
            <td>${song.score}</td>
            <td>
                <c:forEach items="${song.listg}" var="gs">
                    ${gs.gname}
                </c:forEach>
            </td>
            <td>
                <a href="down.do?filep=${song.spath}">下载</a>
                <a href="dels.do?sid=${song.sid}">删除</a>
                <a href="show.jsp?sid=${song.sid}">详情</a>
                <a href="ping.jsp?sid=${song.sid}">评分</a>
            </td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="10">
            第${plist.pageNum}/${plist.pages}页
            <a href="list.do?pageNum=${plist.firstPage}">首页</a>
            <a href="list.do?pageNum=${plist.prePage}">上一页</a>
            <a href="list.do?pageNum=${plist.nextPage}">下一页</a>
            <a href="list.do?pageNum=${plist.lastPage}">尾页</a>
        </td>
    </tr>
</table>
</body>
</html>
